package com.workstudy.workstudy.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.workstudy.workstudy.mapper.WorkstudyOpentimesetMapper;
import com.workstudy.workstudy.domain.WorkstudyOpentimeset;
import com.workstudy.workstudy.service.IWorkstudyOpentimesetService;
import com.workstudy.common.core.text.Convert;

/**
 * 系统开放时间设置Service业务层处理
 * 
 * @author ws
 * @date 2021-03-28
 */
@Service
public class WorkstudyOpentimesetServiceImpl implements IWorkstudyOpentimesetService 
{
    @Autowired
    private WorkstudyOpentimesetMapper workstudyOpentimesetMapper;

    /**
     * 查询系统开放时间设置
     * 
     * @param opentimeSetId 系统开放时间设置ID
     * @return 系统开放时间设置
     */
    @Override
    public WorkstudyOpentimeset selectWorkstudyOpentimesetById(Long opentimeSetId)
    {
        return workstudyOpentimesetMapper.selectWorkstudyOpentimesetById(opentimeSetId);
    }

    /**
     * 查询系统开放时间设置列表
     * 
     * @param workstudyOpentimeset 系统开放时间设置
     * @return 系统开放时间设置
     */
    @Override
    public List<WorkstudyOpentimeset> selectWorkstudyOpentimesetList(WorkstudyOpentimeset workstudyOpentimeset)
    {
        return workstudyOpentimesetMapper.selectWorkstudyOpentimesetList(workstudyOpentimeset);
    }

    /**
     * 新增系统开放时间设置
     * 
     * @param workstudyOpentimeset 系统开放时间设置
     * @return 结果
     */
    @Override
    public int insertWorkstudyOpentimeset(WorkstudyOpentimeset workstudyOpentimeset)
    {
        return workstudyOpentimesetMapper.insertWorkstudyOpentimeset(workstudyOpentimeset);
    }

    /**
     * 修改系统开放时间设置
     * 
     * @param workstudyOpentimeset 系统开放时间设置
     * @return 结果
     */
    @Override
    public int updateWorkstudyOpentimeset(WorkstudyOpentimeset workstudyOpentimeset)
    {
        return workstudyOpentimesetMapper.updateWorkstudyOpentimeset(workstudyOpentimeset);
    }

    /**
     * 删除系统开放时间设置对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWorkstudyOpentimesetByIds(String ids)
    {
        return workstudyOpentimesetMapper.deleteWorkstudyOpentimesetByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除系统开放时间设置信息
     * 
     * @param opentimeSetId 系统开放时间设置ID
     * @return 结果
     */
    @Override
    public int deleteWorkstudyOpentimesetById(Long opentimeSetId)
    {
        return workstudyOpentimesetMapper.deleteWorkstudyOpentimesetById(opentimeSetId);
    }

    @Override
    public WorkstudyOpentimeset selectWorkstudyOpentimesetByroleId(Long roleId) {
        return workstudyOpentimesetMapper.selectWorkstudyOpentimesetByroleId(roleId);
    }
}
